/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.opgea.qms.dao.util;


import com.opgea.qms.domain.entities.Company;
import com.opgea.qms.domain.entities.CurrentToken;
import com.opgea.qms.domain.entities.Destination;
import com.opgea.qms.domain.entities.Employee;
import com.opgea.qms.domain.entities.Login;
import com.opgea.qms.domain.entities.Token;
import com.opgea.qms.domain.entities.TokenDetails;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

/**
 *
 * @author Ramesh
 */
public class TestCreate {
    
    public static void main(String args[]){
        AnnotationConfiguration config = new AnnotationConfiguration();
        config.addAnnotatedClass(Company.class);
        config.addAnnotatedClass(Token.class);
        config.addAnnotatedClass(TokenDetails.class);
        config.addAnnotatedClass(CurrentToken.class);
        config.addAnnotatedClass(Employee.class);
        config.addAnnotatedClass(Login.class);
        config.addAnnotatedClass(Destination.class);
        config.configure("hibernate.cfg.xml");
        new SchemaExport(config).create(true, true);
    }
}
